package com.xhwl.data.service;

import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.VerificationCode;
import com.xhwl.common.pojo.cent.sdata.Account;
import org.springframework.web.bind.annotation.*;

@RestController
public interface IMessageCodeService {

    /**
     * 发送短信 （需登录）
     *
     * @param phone
     * @param projectId
     * @param operateAccount
     * @return
     */
    ResultJson sendMsgCode(String phone, Integer projectId, Account operateAccount);

    /**
     * 发送短信 （不需登录）
     *
     * @param phone
     * @param projectId
     * @param industryId
     * @return
     */
    ResultJson sendMsgCodeOpen(String phone, Integer projectId, String industryId);

    ResultJson sendEmailCode(String email,Integer projectId,String industryId);
    /**
     * 验证码发送校验
     *
     * @param phone
     * @param msgCode
     * @param needRemove
     * @return
     */
    @RequestMapping(value = "/message-service/msg-code-verify", method = RequestMethod.POST)
    ResultJson phoneMsgCodeVerify(@RequestPart("industryId") String industryId, @RequestPart("phone") String phone, @RequestPart("msgCode") String msgCode, @RequestPart("needRemove") Boolean needRemove);

    @PostMapping("/message-service/verification-code")
    ResultJson sendCode(@RequestPart("verificationCode") VerificationCode verificationCode);

    /**
     * 获取短信模版id
     * @param projectId
     * @param industryId
     * @param templateCode
     * @return
     */
    Integer getMsgTemplateId(Integer projectId, String industryId, String templateCode);
}
